﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace splashScreen
{
    public partial class Consultar : Form
    {
        public Consultar()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                ConsultaCliente co = null;

                foreach (Form frm in MdiChildren)
                {

                    if (frm is ConsultaCliente)
                    {
                        co = (ConsultaCliente)frm;
                        break;
                    }
                }

                if (co == null)
                {
                    co = new ConsultaCliente();
                    co.MdiParent = this;
                    co.Show();
                }
                co.Focus();
                this.Hide();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Não foi possível abrir o formulário: " + ex.Message,
                "Aviso",
                MessageBoxButtons.OK,
                MessageBoxIcon.Information);
            }
        }

        private void button6_Click(object sender, EventArgs e)
        {
           
        }
    }
}
